﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admini/MasterDetail.Master" AutoEventWireup="true" CodeBehind="RolesDetail.aspx.cs" Inherits="ART.Admini.Users.RolesDetail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHeader" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphContent" runat="server">
    <div id="h_main">
        <span class="red">◆</span> 表示必填字段</div>
    <div id="h_operate" style="padding-top: 5px;">
        <table border="0" cellpadding="0" cellspacing="1" bgcolor="#ffffff" width="100%">
            <tr>
                <td class="td_title">
                    <span class="red">◆</span> 角色名称：</td>
                <td class="td_content">
                    <asp:TextBox ID="txtPostName" runat="server" MaxLength="25"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="角色名称不能为空!"
                        ControlToValidate="txtPostName" ValidationGroup="add" Display="None"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="td_title">
                    备 注：</td>
                <td class="td_content">
                    <asp:TextBox ID="txtRemarks" runat="server" Height="80px" TextMode="MultiLine" MaxLength="255"></asp:TextBox></td>
            </tr>
            <tr>
                <td class="td_title">
                    <span class="red">◆</span> 排 序：</td>
                <td class="td_content">
                    <asp:TextBox ID="txtSort" runat="server" onkeypress="isNum()" Width="60px">0</asp:TextBox>
                    <span>填写数字</span><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
                        ErrorMessage="排序不能为空!" ControlToValidate="txtSort" ValidationGroup="add" Display="None"></asp:RequiredFieldValidator><asp:RangeValidator
                            ID="RangeValidator1" runat="server" ControlToValidate="txtSort" Display="None"
                            ErrorMessage="请正确填写排序!" MaximumValue="100000" MinimumValue="0" Type="Integer"
                            ValidationGroup="add"></asp:RangeValidator></td>
            </tr>
            <tr>
                <td class="td_title">
                    权限设置：</td>
                <td class="td_content">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <contenttemplate>
                    <asp:Repeater ID="repPermissions" runat="server" OnItemDataBound="repPermissions_ItemDataBound">
                        <HeaderTemplate>
                            <table border="0" cellpadding="5" cellspacing="1" style="width: 100%; background: #ccc;">
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr class="tr_data" style="border-bottom:1px #ccc solid;">
                                <td style="background: #fff; width: 80px;">
                                    <asp:CheckBox ID="cheFirst" Text='<%# Eval("PermissName") %>' ToolTip='<%# Eval("Id") %>'
                                        runat="server" AutoPostBack="true" />
                                    <div class="bak" style="text-align: left;">
                                        <%# Eval("PermissName")%>
                                    </div>
                                    <asp:HiddenField ID="hidPermissionsId" Value='<%# Eval("Id")%>' runat="server" />
                                </td>
                                <td style="background: #fff; vertical-align: top;">
                                    <asp:Repeater ID="repItemPermissions" runat="server" OnItemDataBound="repItemPermissions_ItemDataBound">
                                        <HeaderTemplate>
                                            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <tr>
                                                <td style="width: 100px;">
                                                    <asp:CheckBox ID="cheSecond" Text='<%# Eval("PermissName") %>' ToolTip='<%# Eval("Id") %>'
                                                        runat="server" AutoPostBack="true" OnCheckedChanged="cheSecond_CheckedChanged" />
                                                    <asp:HiddenField ID="hidItemPermissionsId" Value='<%#Eval("Id")%>' runat="server" />
                                                </td>
                                                <td style="border-bottom: 1px #ccc solid;">
                                                    <asp:CheckBoxList ID="chelPermissionsIds" runat="server" RepeatColumns="3" RepeatDirection="Horizontal"
                                                        DataTextField="PermissName" DataValueField="id">
                                                    </asp:CheckBoxList>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                        <FooterTemplate>
        </table>
        </FooterTemplate> </asp:Repeater> </td> </tr> </ItemTemplate>
        <footertemplate>
                            </table>
                        </footertemplate>
        </asp:Repeater> </contenttemplate> </asp:UpdatePanel> </td> </tr> </table>
    </div>
    <div id="h_bottom">
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <contenttemplate>
        <asp:Button ID="btnSave" OnClick="btnSave_Click" runat="server" Text="保 存" ValidationGroup="add" class="btn">
        </asp:Button>
        &nbsp;
        <input id="Button1" type="button" value="关 闭" onclick="closeDlg()" class="btn" /><asp:ValidationSummary
            ID="ValidationSummary1" runat="server" ShowMessageBox="true" ShowSummary="false"
            ValidationGroup="add" />
                    </contenttemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
